home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.9 KB | 105 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWClustr.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWCLUSTR_H
- #define FWCLUSTR_H
-
- #ifndef FWSVIEW_H
- #include "FWSView.h"
- #endif
-
- #ifndef FWBUTTON_H
- #include "FWButton.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWSTRING_H
- #include "FWString.h"
- #endif
-
- #ifndef FWRECEVR_H
- #include "FWRecevr.h"
- #endif
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- //========================================================================================
- // Foward class declarations
- //========================================================================================
-
- class FW_CMouseEvent;
-
- //========================================================================================
- // Type Declarations
- //========================================================================================
-
- typedef FW_TOrderedCollection<FW_CButton> FW_CButtonList;
-
- //========================================================================================
- // CLASS FW_CRadioCluster
- //========================================================================================
-
- class FW_CRadioCluster : public FW_MReceiver
- {
- // ----- Initialization/destruction
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_CRadioCluster)
-
- FW_CRadioCluster(Environment* ev);
- virtual ~FW_CRadioCluster();
-
- public:
- // ----- New API
- virtual void AddRadio(Environment* ev, FW_CButton* radio);
- virtual void RemoveRadio(Environment* ev, FW_CButton* radio);
-
- FW_CButton* GetButtonOn(Environment* ev) const;
- ODID GetButtonIDOn(Environment* ev) const;
-
- // ----- inherited from FW_MReceiver
- virtual void HandleNotification(Environment* ev, const FW_CNotification& notification);
-
- // ----- Archiving -----
- static void* Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
- static void Read(FW_CReadableStream& stream, FW_ClassTypeConstant type, void* object);
- static void Write(FW_CWritableStream& stream, FW_ClassTypeConstant type, const void *object);
- static void Destroy(void* object, FW_ClassTypeConstant type);
-
- virtual void Flatten(Environment*ev, FW_CWritableStream& stream) const;
- virtual void InitializeFromStream(Environment*ev, FW_CReadableStream& stream);
-
- private:
- FW_CButton* fButtonOn;
- FW_CButtonList fButtonList;
- };
-
- //----------------------------------------------------------------------------------------
- // inlines
- //----------------------------------------------------------------------------------------
-
- inline ODID FW_CRadioCluster::GetButtonIDOn(Environment* ev) const
- {
- return fButtonOn->GetViewID(ev);
- }
-
- inline FW_CButton* FW_CRadioCluster::GetButtonOn(Environment*) const
- {
- return fButtonOn;
- }
-
- #endif
-